package chapter10.Final01.Exercise;
//编写一个程序能够计算圆形面积
public class FinalEx01 {
    public static void main(String[] args) {
        Circle circle = new Circle(1);
        Circle circle1 = new Circle(2);
        Circle circle2= new Circle(3);
        System.out.println(circle.area1());
        System.out.println(circle1.area2());
        System.out.println(circle2.area3());
    }
}
class Circle{
    private double radius;
    private final double PI = 3.14;
    private final double PI1;
    private final double PI2;
    {
        PI2=3.14;
    }
    public Circle(double radius) {
        PI1=3.14;
        this.radius = radius;
    }
    public double area1(){
        return PI1*radius*radius;
    }
    public double area2(){
        return PI2*radius*radius;
    }

    public double area3(){
        return PI*radius*radius;
    }


}